package com.john.blog.model.po;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * 上层基础模型
 * 
 * @author JiangGengchao
 * @date 2018年2月28日
 */
public abstract class Model {

    public final static String ID = "id";
    public final static String CREATEDATE = "createDate";
    public final static String UPDATEDATE = "updateDate";

    /**
     * 主键，UUID作为键值
     */
    @Id
    protected String id;

    /**
     * 创建时间
     */
    @Column(name = "createDate")
    protected Date createDate;

    /**
     * 更新时间
     */
    @Column(name = "updateDate")
    protected Date updateDate;

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return the createDate
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * @param createDate
     *            the createDate to set
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * @return the updateDate
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     * @param updateDate
     *            the updateDate to set
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

}
